Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Psalm plugins revamp + PHPUnit, Symfony #252

Merged
merged 3 commits into from
Mar 21, 2021
Merged

Conversation

dkarlovi
Copy link
Contributor

  1. Psalm moved from PHAR to be installed via Composer (AFAIK, required for the plugins to be found)
  2. moved the existing Doctrine plugin to the same namespace, psalm
  3. added Symfony plugin, Include the psalm Symfony plugin #235
  4. added PHPUnit plugin, Psalm PHPUnit plugin #99

@dkarlovi
Copy link
Contributor Author

The issue here is described in vimeo/psalm#3640

@jakzal
Copy link
Owner

jakzal commented Jun 23, 2020

Thank you for working on this.

Integrated tests are failing:

-e ✘psalm-plugin-doctrine
777
Makefile:32: recipe for target 'test-integration' failed

@dkarlovi
Copy link
Contributor Author

@jakzal I know, the psalm-plugin tool (which I'd like to use to confirm Psalm can actually find the plugins) currently doesn't work without a config file, it's in the linked issue.

@dkarlovi
Copy link
Contributor Author

Fixed the underlying issue in vimeo/psalm#4639, but in the meantime Psalm 4 came out and plugins haven't caught up yet:
psalm/psalm-plugin-doctrine#78

@jakzal
Copy link
Owner

jakzal commented Nov 30, 2020

@dkarlovi could this issue be related? jakzal/phpqa#263

@dkarlovi
Copy link
Contributor Author

dkarlovi commented Dec 1, 2020

@jakzal in what way, since this isn't yet merged? 🤔 Or am I misunderstanding you?

@jakzal
Copy link
Owner

jakzal commented Dec 1, 2020

I was more asking if recent changes in psalm could cause that other issue?

@dkarlovi
Copy link
Contributor Author

dkarlovi commented Dec 1, 2020

Not that I know of. Seems like something new, maybe an issue needs to be raised on Psalm repo directly.

@dkarlovi
Copy link
Contributor Author

Seems Psalm Doctrine plugin now allows Psalm 4, this should be revisited soonish. There's also some indication the plugin might become officially supported by Psalm org and/or fully deprecated because of additions to Doctrine itself, see psalm/psalm-plugin-doctrine#84

@jakzal
Copy link
Owner

jakzal commented Jan 26, 2021

@dkarlovi can you rebase when you have few minutes?

@dkarlovi
Copy link
Contributor Author

Sure, left as TODO, will do it tomorrow. 👍

resources/psalm.json Outdated Show resolved Hide resolved
@dkarlovi
Copy link
Contributor Author

@jakzal please check now, not happy with the workaround mentioned, maybe you have a better idea?

@jakzal
Copy link
Owner

jakzal commented Mar 19, 2021

@dkarlovi since you renamed some tools, can you also regenerate the README with php bin/devkit.php update:readme please?

@dkarlovi
Copy link
Contributor Author

@jakzal done

@jakzal
Copy link
Owner

jakzal commented Mar 19, 2021

@dkarlovi how risky is this change? :)

We have a relatively big change coming in soon (#369), and I'm thinking about how to approach merges and releases. #369 should definitely go in on its own release, and then sit in phpqa's master for a little while before it's tagged in phpqa. I'm wondering if this change should follow a similar process.

@dkarlovi
Copy link
Contributor Author

@jakzal IMO it's not very risky, the major difference is you now don't have two separate Psalm's (the PHAR which is not capable of using plugins and the one embedded into the doctrine-psalm-plugin namespace which is, but can only see the single plugin).

It will only affect people who currently use the Doctrine plugin in that they'll need to use psalm without the full path, so the migration path is very clear. Everyone else is unaffected.

@dkarlovi
Copy link
Contributor Author

@jakzal what do you see as the way forward here?

@jakzal jakzal merged commit c19a208 into jakzal:master Mar 21, 2021
@jakzal
Copy link
Owner

jakzal commented Mar 21, 2021

Thank you @dkarlovi 🍺

github-actions bot pushed a commit to jakzal/phpqa that referenced this pull request Mar 21, 2021
Additions:

* psalm-plugin-phpunit - [Psalm plugin for PHPUnit](https://github.com/psalm/psalm-plugin-phpunit) jakzal/toolbox#252 thanks @dkarlovi

* psalm-plugin-symfony - [Psalm Plugin for Symfony](https://github.com/psalm/psalm-plugin-symfony) jakzal/toolbox#252  thanks @dkarlovi
@dkarlovi dkarlovi deleted the psalm-plugins branch March 22, 2021 10:08
@dkarlovi
Copy link
Contributor Author

BTW @jakzal this works, I've tried jakzal/phpqa:alpine just now, it loads the plugins correctly on my test project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants